!------------------------------------------------------------------------------
! TJU/Department of Mechanics, Fluid Mechanics, Code START
!------------------------------------------------------------------------------
!> @Author: Jianxin Liu shookware@tju.edu.cn
!> @Date: 2024-08-02 17:18:34
!> @LastEditTime: 2024-08-05 10:29:08
!> @LastEditors: Jianxin Liu shookware@tju.edu.cn
!> @Description:
!> @FilePath: /START_NS_3D/src/field/module_conservative.f90
!> @Copyright (c) 2024 by Jianxin Liu email: shookware@tju.edu.cn, All Rights Reserved.
!------------------------------------------------------------------------------
module mod_conservative

   use petsc_wrapper_vector
   use petsc_wrapper_print
   use mod_field_base
   implicit none
   private
   public :: type_conservative

   type, extends(type_field_base) :: type_conservative
      type(type_domain_vector), pointer :: Q
   contains

      procedure :: push
      procedure :: destroy

   end type type_conservative

contains

   subroutine push(this, Q)
      implicit none
      class(type_conservative), intent(inout) :: this
      type(type_domain_vector), intent(in), target :: Q

      this%Q => Q

   end subroutine push

   subroutine destroy(this)
      implicit none
      class(type_conservative), intent(inout) :: this

      this%Q => null()
      this%eos => null()

   end subroutine destroy

end module mod_conservative
